function AjaxInitForm(formObj, btnObj, url) {
    $(btnObj).unbind().bind("click", function () {
        $.ajax({
            type: "post",
            url: url,
            data: $(formObj).serialize(),
            dataType: "json",
            timeout: 60000,
            beforeSend: function () {
                $(btnObj).prop("disabled", true);
                $(btnObj).val("提交中...");
            },
            success: function (data) {
                if (data.status == 1) {
                    $(btnObj).val("提交成功");
                    setTimeout(function () {
                        location.href = data.url;
                    }, 1000);
                } else {
                    $.alert(data.msg);
                    $(btnObj).prop("disabled", false);
                    $(btnObj).val("再次提交");
                }
            },
            error: function (e) {
                $.alert("程序出错，请联系管理员！");
                $(btnObj).prop("disabled", false);
                $(btnObj).val("再次提交");
            }
        });
    });
}
function getvtBind(obj) {
    var that = $(obj),
            $taskid = that.attr("data-taskid"),
            $tasknum = that.attr("data-tasknum");
    that.attr("disabled", true);
    $.post("/task/validatetask.html", {"taskid": $taskid, "tasknum": $tasknum}, function (data) {
        if (data.status === true) {
            location.href = data.url;
        } else {
            $.alert(data.msg);
            that.removeAttr("disabled");
        }
    }, "json");
}
;